//
//  LJLeftTableViewCell.m
//  百思不得姐
//
//  Created by 刘鹿杰 on 16/7/13.
//  Copyright © 2016年 刘鹿杰. All rights reserved.
//

#import "LJLeftTableViewCell.h"
#import "UIView+LJExtension.h"
#import "LJleftModel.h"

@interface LJLeftTableViewCell()

@property (weak, nonatomic) IBOutlet UIView *indecterView;



@end


@implementation LJLeftTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    self.backgroundColor = LJRGBColor(244, 244, 244);
    self.indecterView.backgroundColor = LJRGBColor(219, 21, 26);


}


-(void)setLeftModel:(LJleftModel *)leftModel{
    
    _leftModel = leftModel;
    self.textLabel.text = leftModel.name;
    
}

-(void)layoutSubviews{
    
    [super layoutSubviews];
    
    self.textLabel.y = 1;
    self.textLabel.textAlignment = NSTextAlignmentCenter;
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    self.indecterView.hidden = !selected;
    self.textLabel.textColor = selected ? LJRGBColor(219, 21, 26) : LJRGBColor(78, 78, 78);
    
    
}

@end
